<template>
<div>
  <router-link :to="`/loading/l1?id=${id}&name=wzy`">去到l1</router-link><br><!--动态变量放到路由-->
  <a :href="resolveUrl('/login')" target="_blank">a标签----去到l1</a>    <!--跳到新的界面，同时保留路由属性-->
  <div style="width: 100px;height: 100px;"></div>
  <router-view></router-view>
</div>

</template>
<script setup>
import { useRoute,useRouter } from 'vue-router';
const route = useRoute()
import router from '@/router'; 

  const id=3

 const resolveUrl=(route)=>{
  return router.resolve(route).href
 }
</script>
<style scoped>
  
</style>